/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ==============================================================================
 */

*:not(mat-icon) {
  font-family: 'Google Sans Text', Arial, Helvetica, sans-serif;
}

.title-container {
  background-color: var(--me-surface-container-high-color);
  border-bottom: 1px solid var(--me-outline-variant-color);
}

.title {
  font-size: 24px;
  font-weight: 500;
  margin-top: -16px;
}

.local-storage-info {
  font-size: 12px;
  color: var(--me-on-surface-variant-color);
  margin-top: 6px;
}

.dialog-content {
  padding-bottom: 0;
  background-color: var(--me-surface-container-low-color);
}

.settings-container {
  font-size: 13px;
  color: var(--me-on-surface-color);
  margin-top: 20px;
  margin-bottom: 10px;
}

.settings-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;

  &.hide {
    display: none;
  }
}

.setting-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;

  .setting-label {
    line-height: 16px;
    margin-bottom: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .icon-container {
      width: 16px;
      height: 16px;
      margin-left: 12px;
      opacity: 0.6;
      cursor: pointer;

      &:hover {
        opacity: 0.8;
      }

      mat-icon {
        font-size: 16px;
        width: 16px;
        height: 16px;
      }
    }
  }

  input,
  textarea {
    color: var(--me-on-surface-color);
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--me-outline-color);
    border-radius: 3px;
  }

  // Hide up/down arrows for number input.
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .reset {
    color: var(--me-on-surface-variant-color);
    cursor: pointer;
    margin-top: 2px;
    text-decoration: underline;
    user-select: none;

    &:hover {
      opacity: 0.6;
    }
  }
}

.color-picker-container {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--me-outline-color);
  width: 100%;
  box-sizing: border-box;
  height: 24px;
  position: relative;

  &:focus-within {
    border-color: var(--me-primary-color);
    outline: 1px solid var(--me-primary-color);
  }

  label {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 2px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--me-outline-variant-color);
    flex-shrink: 0;

    input {
      visibility: hidden;
    }
  }

  input[type='text'] {
    border: none;
    height: 100%;
    outline: none;
  }
}

.buttons-container {
  border-top: 1px solid var(--me-outline-variant-color);
  background-color: var(--me-surface-container-high-color);
}

::ng-deep {
  .model-explorer-settings-help-popup {
    font-size: 12px;
    padding: 8px;
    background-color: var(--me-surface-container-low-color);
    line-height: normal;

    .bold {
      font-weight: 700;
    }
  }
}
